﻿using System.ComponentModel.DataAnnotations;
using Inovout.Data.Domain;

namespace KuaJing.Portal.Cms.Domain
{
    partial class Category : TreeDataObject<Category>
    {
        public Category()
        {
        }
        [Required(ErrorMessage = "名称不能为空！")]
        [StringLength(10, MinimumLength = 3, ErrorMessage = "长度最小值为3个")]
        [Display(Name = "名称")]
        public virtual string Name { get; set; }

        [Select(SelectType.DropDownList, "Name")]
        public override Category Parent
        {
            get
            {
                return base.Parent;
            }
            set
            {
                base.Parent = value;
            }
        }
    }
}
